package com.fenqing.comics.dao.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fenqing.comics.dao.ICategoryDao;
import com.fenqing.comics.dao.mapper.CategoryMapper;
import com.fenqing.comics.entity.CategoryEntity;
import org.springframework.stereotype.Repository;

/**
 * @author fenqing
 */
@Repository
public class CategoryDaoImpl extends ServiceImpl<CategoryMapper, CategoryEntity> implements ICategoryDao {
    @Override
    public boolean existsByName(String name) {
        return this.lambdaQuery().eq(CategoryEntity::getName, name)
                .exists();
    }
}
